package Mediator;

public class Client {
    public static void main(String[] args) {
        AbstractChatroom happyChat = new ChatGroup();
        Member m1,m2,m3,m4,m5;
        m1 = new DiamondMember("张三");
        m2 = new DiamondMember("李四");
        m3 = new CommonMember("王五");
        m4 = new CommonMember("赵六");
        m5 = new CommonMember("田七");

        happyChat.register(m1);
        happyChat.register(m2);
        happyChat.register(m3);
        happyChat.register(m4);
        happyChat.register(m5);

        m1.sendText("李四","李四，你好");
        m2.sendText("张三","张三，你好");
        m1.sendText("李四","今天天气不错");
        m2.sendImage("张三","非常大的大太阳");
        m2.sendImage("张三","太阳");

        m3.sendText("赵六","还有问题吗？");
        m3.sendText("田七","还有问题吗？");
        m4.sendText("王五","没有问题了，谢谢");
        m5.sendText("王五","我也没有问题了！");
        m5.sendText("王五","谢谢");
    }
}
